<template>
    <div>
        <el-form label-position="left" label-width="100px" v-model="simplePie">
            <el-form-item label="中心横坐标">
              <el-input v-model="simplePie.center[0]" size="mini"></el-input>
            </el-form-item>
            <el-form-item label="中心纵坐标">
              <el-input v-model="simplePie.center[1]" size="mini"></el-input>
            </el-form-item>
            <el-form-item  label="起始角度">
                <el-input-number v-model="simplePie.startAngle" :min="0" :max="360" size="mini"></el-input-number>
            </el-form-item>
            <el-form-item label="方向">
              <el-radio v-model="simplePie.clockwise" :label="true">顺时针</el-radio>
              <el-radio v-model="simplePie.clockwise" :label="false">逆时针</el-radio>
            </el-form-item>
            <el-form-item label="内径">
              <el-input v-model="simplePie.radius[0]" size="mini"></el-input>
            </el-form-item>
            <el-form-item label="外径">
              <el-input v-model="simplePie.radius[1]" size="mini"></el-input>
            </el-form-item>
            <el-form-item label="悬停放大">
              <el-radio v-model="simplePie.hoverAnimation" :label="true">开启</el-radio>
              <el-radio v-model="simplePie.hoverAnimation" :label="false">关闭</el-radio>
            </el-form-item>
            <el-divider content-position="center">边框</el-divider>
            <el-divider content-position="left">普通样式</el-divider>
            <el-form-item label="颜色">
              <el-color-picker v-model="simplePie.itemStyle.borderColor" show-alpha size="small" @active-change="itemStyleBorderColor"></el-color-picker>
            </el-form-item>
            <el-form-item  label="宽度">
                <el-input-number v-model="simplePie.itemStyle.borderWidth" :min="0" :max="20" size="mini"/>
            </el-form-item>
            <el-form-item  label="类型">
               <el-select v-model="simplePie.itemStyle.borderType" placeholder="solid" size="mini">
                <el-option label="————————" value="solid"/>
                <el-option label="------------------------" value="dashed"/>
                <el-option label="························" value="dotted"/>
              </el-select>
            </el-form-item>
            <el-divider content-position="left">强调样式</el-divider>
            <el-form-item label="颜色">
              <el-color-picker v-model="simplePie.emphasis.itemStyle.borderColor" show-alpha size="small" @active-change="emphasisItemStyleBorderColor"></el-color-picker>
            </el-form-item>
            <el-form-item  label="宽度">
                <el-input-number v-model="simplePie.emphasis.itemStyle.borderWidth" :min="0" :max="20" size="mini"/>
            </el-form-item>
            <el-form-item  label="类型">
               <el-select v-model="simplePie.emphasis.itemStyle.borderType" placeholder="solid" size="mini">
                <el-option label="————————" value="solid"/>
                <el-option label="------------------------" value="dashed"/>
                <el-option label="························" value="dotted"/>
              </el-select>
            </el-form-item>
            <el-divider content-position="center">阴影</el-divider>
            <el-divider content-position="left">普通样式</el-divider>
            <el-form-item  label="颜色">
              <el-color-picker v-model="simplePie.itemStyle.shadowColor" show-alpha size="small" @active-change="itemStyleShadowColor"></el-color-picker>
            </el-form-item>
            <el-form-item  label="模糊">
              <el-input-number v-model="simplePie.itemStyle.shadowBlur" :min="2" :max="20" size="mini"></el-input-number>
            </el-form-item>
            <el-form-item  label="水平偏移">
              <el-input-number v-model="simplePie.itemStyle.shadowOffsetX" :min="0" :max="20" size="mini"></el-input-number>
            </el-form-item>
            <el-form-item  label="垂直偏移">
              <el-input-number v-model="simplePie.itemStyle.shadowOffsetY" :min="0" :max="20" size="mini"></el-input-number>
            </el-form-item>
            <el-divider content-position="left">强调样式</el-divider>
            <el-form-item  label="颜色">
              <el-color-picker v-model="simplePie.emphasis.itemStyle.shadowColor" show-alpha size="small" @active-change="emphasisItemStyleShadowColor"></el-color-picker>
            </el-form-item>
            <el-form-item  label="模糊">
              <el-input-number v-model="simplePie.emphasis.itemStyle.shadowBlur" :min="2" :max="20" size="mini"></el-input-number>
            </el-form-item>
            <el-form-item  label="水平偏移">
              <el-input-number v-model="simplePie.emphasis.itemStyle.shadowOffsetX" :min="0" :max="20" size="mini"></el-input-number>
            </el-form-item>
            <el-form-item  label="垂直偏移">
              <el-input-number v-model="simplePie.emphasis.itemStyle.shadowOffsetY" :min="0" :max="20" size="mini"></el-input-number>
            </el-form-item>
            <el-divider content-position="center">标签</el-divider>
            <el-divider content-position="left">普通样式</el-divider>
            <el-form-item label="显示">
              <el-radio v-model="simplePie.label.show" :label="true">是</el-radio>
              <el-radio v-model="simplePie.label.show" :label="false">否</el-radio>
            </el-form-item>
            <el-form-item  label="位置">
               <el-select v-model="simplePie.label.position" placeholder="solid" size="mini">
                <el-option label="外部" value="outside"/>
                <el-option label="内部" value="inside"/>
                <el-option label="中心" value="center"/>
              </el-select>
            </el-form-item>
            <el-form-item label="格式">
              <el-input v-model="simplePie.label.formatter" size="mini"></el-input>
            </el-form-item>
            <el-form-item label="颜色">
              <el-color-picker v-model="simplePie.label.color" show-alpha size="small" @active-change="labelColor"></el-color-picker>
            </el-form-item>
            <el-form-item  label="字体">
               <el-select v-model="simplePie.label.fontFamily" placeholder="serif" size="mini">
                <el-option label="serif" value="serif"/>
                <el-option label="monospace" value="monospace"/>
                <el-option label="Courier New" value="Courier New"/>
                <el-option label="Microsoft YaHei" value="Microsoft YaHei"/>
              </el-select>
            </el-form-item>
            <el-form-item  label="字号">
              <el-input-number v-model="simplePie.label.fontSize" :min="0" :max="100" size="mini"></el-input-number>
            </el-form-item>
            <el-form-item  label="粗细">
              <el-select v-model="simplePie.label.fontWeight" placeholder="normal" size="mini">
                <el-option label="normal" value="normal"/>
                <el-option label="bold" value="bold"/>
                <el-option label="bolder" value="bolder"/>
                <el-option label="lighter" value="lighter"/>
              </el-select>
            </el-form-item>
                        <el-divider content-position="left">强调样式</el-divider>
            <el-form-item label="显示">
              <el-radio v-model="simplePie.emphasis.label.show" :label="true">是</el-radio>
              <el-radio v-model="simplePie.emphasis.label.show" :label="false">否</el-radio>
            </el-form-item>
            <el-form-item  label="位置">
               <el-select v-model="simplePie.emphasis.label.position" placeholder="solid" size="mini">
                <el-option label="外部" value="outside"/>
                <el-option label="内部" value="inside"/>
                <el-option label="中心" value="center"/>
              </el-select>
            </el-form-item>
            <el-form-item label="格式">
              <el-input v-model="simplePie.emphasis.label.formatter" size="mini"></el-input>
            </el-form-item>
            <el-form-item label="颜色">
              <el-color-picker v-model="simplePie.emphasis.label.color" show-alpha size="small" @active-change="emphasisLabelColor"></el-color-picker>
            </el-form-item>
            <el-form-item  label="字体">
               <el-select v-model="simplePie.emphasis.label.fontFamily" placeholder="serif" size="mini">
                <el-option label="serif" value="serif"/>
                <el-option label="monospace" value="monospace"/>
                <el-option label="Courier New" value="Courier New"/>
                <el-option label="Microsoft YaHei" value="Microsoft YaHei"/>
              </el-select>
            </el-form-item>
            <el-form-item  label="字号">
              <el-input-number v-model="simplePie.emphasis.label.fontSize" :min="0" :max="100" size="mini"></el-input-number>
            </el-form-item>
            <el-form-item  label="粗细">
              <el-select v-model="simplePie.emphasis.label.fontWeight" placeholder="normal" size="mini">
                <el-option label="normal" value="normal"/>
                <el-option label="bold" value="bold"/>
                <el-option label="bolder" value="bolder"/>
                <el-option label="lighter" value="lighter"/>
              </el-select>
            </el-form-item>
        </el-form>
    </div>
</template>

<script>

export default {
  data: function () {
    return {
    }
  },
  methods: {
    itemStyleBorderColor (val) {
      this.simplePie.itemStyle.borderColor = val
    },
    itemStyleShadowColor (val) {
      this.simplePie.itemStyle.shadowColor = val
    },
    labelColor (val) {
      this.simplePie.label.color = val
    },
    emphasisItemStyleBorderColor (val) {
      this.simplePie.emphasis.itemStyle.borderColor = val
    },
    emphasisItemStyleShadowColor (val) {
      this.simplePie.emphasis.itemStyle.shadowColor = val
    },
    emphasisLabelColor (val) {
      this.simplePie.emphasis.label.color = val
    }
  },
  computed: {
    simplePie () {
      return this.$store.state.layout[this.$store.state.activeArrayIndex].SlideContent[this.$store.state.insideActiveArrayIndex].itemContent.detail.simplePie
    }
  },
  watch: {
  },
  components: {
  }
}
</script>

<style scoped>
    .el-form-item {
        margin-bottom: 0px
    }
</style>
